#pragma once

struct T_Point
{
	int x;
	int y;
};

struct T_Line
{
	T_Point tStart;
	T_Point tEnd;
};

/* p0p1 x p0p2 */
int CalcCrossMulti(T_Point& p0, T_Point& p1, T_Point p2);

bool CrossLine(T_Line& lineA, T_Line& lineB);

bool PointOnLine(T_Point& pt, T_Line& line);

bool SegLineInterSect(T_Line& lineA, T_Line& lineB);

void RandSet(T_Point& pt);
void RandSet(T_Line& line);

float CalcPointDist(const T_Point& p1, const T_Point& p2);
bool SortByYCoord(const T_Point& p1, const T_Point& p2);
bool SortByXCoord(const T_Point& p1, const T_Point& p2);
bool operator==(const T_Point& p1, const T_Point& p2);